package com.ants.logic.visualize.controller;

import com.ants.core.utils.Response;
import com.ants.logic.visualize.dto.DecreaseStorageDto;
import com.ants.logic.visualize.service.TblStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 蚂蚁会花呗
 * @date 2021/9/9 16:04
 */
@RestController
@RequestMapping("storage/storage")
public class TblStorageController {

    @Autowired
    private TblStorageService tblStorageService;

    /**
     * 增减库存
     * @param decreaseStorageDto
     * @return
     */
    @PostMapping("decreaseStorage")
    public Response decreaseStorage(@RequestBody DecreaseStorageDto decreaseStorageDto){
        tblStorageService.decreaseStorage(decreaseStorageDto);
        return Response.ok();

    }
}
